<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Course Registration Site</title>
	<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="style.css" />
	<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<noscript><p>WARNING: This site works best with JavaScript <em>enabled</em>.</p></noscript>
<div id="header"><h1>Welcome to Course Management Site</h1></div>
<div id="wrapper">
<div style="float: left">
	<form id="Register" action="/skiryanoandspuzir/Entry" method="post" onsubmit="javascript:return validateRegistration('Register');">
		<h2>Register</h2>
		<% if (request.getSession(true).getAttribute("RegistrationError") != null){ %>
		<span class="errorMessage"><%= request.getSession(true).getAttribute("RegistrationError").toString() %></span>
		<% request.getSession(true).removeAttribute("RegistrationError");
			} %>
		<table>  
			<tr> 
				<td>User name: </td><td><input type="text" name="userName" id="regUserName" /></td>
			</tr>
			<tr>
				<td>Password: </td><td><input type="text" name="password" id="regPassword" /></td>
			</tr>
			<tr>
				<td>Name: </td><td><input type="text" name="name" id="regName" /></td>
			</tr>
			<tr>
				<td>Family: </td><td><input type="text" name="family" id="regFamily" /></td>
			</tr>
			<tr>
				<td>Phone: </td><td><input type="text" name="phone" id="regPhone" /></td>
			</tr>
			<tr>
				<td>Magic String: <br />(Admins only) </td><td><input type="text" name="magicString" id="regMagicString" /></td>
			</tr>
			<tr>
				<td><input type="submit" value="Submit" name="Register" /></td><td></td>
			</tr>
		</table>
	</form>
</div>
<div style="float: right">
	<h2>Login</h2>
	<% if (request.getSession(true).getAttribute("LoginError") != null){ %>
		<span class="errorMessage"><%= request.getSession(true).getAttribute("LoginError").toString() %></span>
		<% request.getSession(true).removeAttribute("LoginError");
			} %>
	<form id="Login" action="/skiryanoandspuzir/Entry" method="post" onsubmit="javascript:return validateLogin();">      
		<table>  
			<tr> 
				<td>User name: </td><td><input type="text" name="userName" id="loginUserName" /></td>
			</tr>
			<tr>
				<td>Password: </td><td><input type="text" name="password" id="loginPassword" /></td>
			</tr>
			<tr>
				<td><input type="submit" value="Submit" name="Login" /></td><td></td>
			</tr>
		</table>
		
	</form>
</div>
</div>
</body>
</html>